package com.woniuxy.secondhand.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 发布的产品
 * </p>
 *
 * @author chaohuijiang
 * @since 2020-09-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("SEC_GOODS")
@ApiModel(value="SecGoods对象", description="发布的产品")
@KeySequence("SEC_GOOD")
public class SecGoods implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品编号")
    @TableId(value = "SEC_GOODS_ID",type = IdType.INPUT)
    private Integer secGoodsId;

    @ApiModelProperty(value = "商品名称")
    @TableField("GOODSNAME")
    private String goodsname;

    @ApiModelProperty(value = "商品详情")
    @TableField("DESCRIPTION")
    private String description;

    @ApiModelProperty(value = "商品图片地址")
    @TableField("IMG")
    private String img;

    @ApiModelProperty(value = "商品视频")
    @TableField("GOODSVEDIO")
    private String goodsvedio;

    @ApiModelProperty(value = "卖价")
    @TableField("PRICE")
    private Integer price;

    @ApiModelProperty(value = "原价")
    @TableField("ORIGINPRICE")
    private Integer originprice;

    @ApiModelProperty(value = "邮费")
    @TableField("POSTPRICE")
    private Integer postprice;

    @ApiModelProperty(value = "商品类型")
    @TableField("GOODSTYPE_ID")
    private Integer goodstypeId;

    @ApiModelProperty(value = " 状态 0表示未出售，1表示已经出售")
    @TableField("STATE")
    private Integer state;

    @ApiModelProperty(value = "发布者编号")
    @TableField("PUBLISHER")
    private String publisher;

    @ApiModelProperty(value = "发布地址")
    @TableField("SADDRESS")
    private String saddress;

    @ApiModelProperty(value = "游览人数")
    @TableField("VISIT")
    private Integer visit;

    @ApiModelProperty(value = "0表示存在1表示下架或者删除")
    @TableField("FLAG")
    private Integer flag;

    @ApiModelProperty(value = "发布时间")
    @TableField("CREATETIME")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createtime;


}
